/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.yourtrade.service.manage;

import com.mycompany.yourtrade.model.Category;
import com.mycompany.yourtrade.model.Commodity;
import com.mycompany.yourtrade.model.Seller;
import com.mycompany.yourtrade.model.Shop;
import java.util.List;
import org.apache.ibatis.annotations.Param;



public interface ShopManageService {
    
    /**
     * 获取商品类别父类
     * @return 
     */
    public List<Category> getParentCategory();
    /**
     * 根据父类id获取子类
     * @param parentId
     * @return 
     */
    public List<Category> getCategoryByParent(@Param("parentId")String parentId);
    /**
     * 获取子分类list
     * @return 
     */
    public List<Category> getCategoryList();
    /**
     * 添加商户
     * @param id
     * @param mobile
     * @param password
     * @return 
     */
    public Integer addSeller(@Param("id")String id,@Param("mobile")String mobile,@Param("password")String password);
    /**
     * 添加商铺
     * @param shop
     * @return 
     */
    public Integer addShop(Shop shop);
    /**
     * 登录验证
     * @param mobile
     * @return 
     */
    public Seller getSellerByMobile(@Param("mobile")String mobile);
    /**
     * 根据sellerId 获取shop
     * @param sellerId
     * @return 
     */
    public Shop getShopBySellerId(@Param("sellerId")String sellerId);
    /**
     * 添加商品
     * @param commodity
     * @return 
     */
    public Integer addCommodity(Commodity commodity);
    /**
     * 根据shopId 获取商品列表--分页
     * @param shopId
     * @return 
     */
    public List<Commodity> getCommodityByShopId(@Param("shopId")String shopId,@Param("page")Integer page,@Param("pagesize")Integer pagesize);
    public Integer getCountByShopId(@Param("shopId")String shopId);
    /**
     * 根据id获取商品详情
     * @param id
     * @return 
     */
    public Commodity getCommodityInfoById(@Param("id")String id);
    /**
     * 更改商品内容
     * @return 
     */
    public Integer updateCommodityInfo(Commodity commodity);
    /**
     * 更改商品是否热门状态
     * @param id
     * @param isHot
     * @return 
     */
    public Integer updateCommodityHot(@Param("id")String id,@Param("isHot")int isHot);
    /**
     * 更改商品是否推荐状态
     * @param id
     * @param isRecommend
     * @return 
     */
    public Integer updateCommodityRec(@Param("id")String id,@Param("isRecommend")int isRecommend);
    /**
     * 删除商品
     * @param id
     * @return 
     */
    public Integer deleteCommodity(@Param("id")String id);
    
}
